home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / PORT / step06 / run.c.diff < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.4 KB  |  48 lines

  1. *** ../step03/run.c    Thu Dec 16 14:59:38 1993
  2. --- run.c    Fri Dec 17 12:10:18 1993
  3. ***************
  4. *** 149,156 ****
  5. --- 149,161 ----
  6.       int execvp(), execv();
  7.       int (*execrtn)() = usepath ? execvp : execv;
  8.   
  9. + #ifdef _ABI_SOURCE
  10. +     if ((pid = fork()) == -1)
  11. +         return(-1);    /* no more process's, so exit with error */
  12. + #else
  13.       if ((pid = vfork()) == -1)
  14.           return(-1);    /* no more process's, so exit with error */
  15. + #endif
  16.   
  17.       if (pid == 0) {            /* child process */
  18.           setgid (getgid());
  19. ***************
  20. *** 164,171 ****
  21.       ignoresig.sa_handler = SIG_IGN;    /* ignore INT and QUIT signals */
  22.       sigemptyset (&(ignoresig.sa_mask));
  23.       ignoresig.sa_flags = 0;
  24. !     sigvec (SIGINT,&ignoresig,&intsig);
  25. !     sigvec (SIGQUIT,&ignoresig,&quitsig);
  26.   #else
  27.       ignoresig.sv_handler = SIG_IGN;    /* ignore INT and QUIT signals */
  28.       ignoresig.sv_mask = 0;
  29. --- 169,176 ----
  30.       ignoresig.sa_handler = SIG_IGN;    /* ignore INT and QUIT signals */
  31.       sigemptyset (&(ignoresig.sa_mask));
  32.       ignoresig.sa_flags = 0;
  33. !     sigaction (SIGINT,&ignoresig,&intsig);
  34. !     sigaction (SIGQUIT,&ignoresig,&quitsig);
  35.   #else
  36.       ignoresig.sv_handler = SIG_IGN;    /* ignore INT and QUIT signals */
  37.       ignoresig.sv_mask = 0;
  38. ***************
  39. *** 174,179 ****
  40. --- 179,185 ----
  41.       sigvec (SIGQUIT,&ignoresig,&quitsig);
  42.   #endif
  43.       do {
  44. +         /* XXX All the signal stuff needs attention */
  45.           wpid = wait3 (&status.w_status, WUNTRACED, 0);
  46.           if (WIFSTOPPED (status)) {
  47.               kill (0,SIGTSTP);
  48.